package com.yvon.maple.cloud.api.msg.feign.factory;

import com.yvon.maple.cloud.api.msg.feign.RemoteMsgClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author : Yvon
 * @since : 2021-09-15
 */
@Slf4j
@Component
public class RemoteMsgFallbackFactory implements FallbackFactory<RemoteMsgClient> {
    @Override
    public RemoteMsgClient create(Throwable cause) {
        log.error("访问【消息服务-消息管理】发生错误: " + cause.getMessage());
        return null;
    }
}
